load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "edenfs-client",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {},
        "features": {"fb": ["sapling-identity/fb"]},
        "lib": {"name": "edenfs-client"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-edenfs-client",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    features = ["fb"],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:fs-err",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:toml",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/fbthrift_ext:socket",
        "//common/rust/shed/tokio-uds-compat:tokio-uds-compat",
        "//eden/scm/lib/async-runtime:async-runtime",
        "//eden/scm/lib/clientinfo:clientinfo",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/filters:filters",
        "//eden/scm/lib/hg-metrics:hg-metrics",
        "//eden/scm/lib/identity:identity",
        "//eden/scm/lib/thrift-types:thrift-types",
        "//eden/scm/lib/types:types",
    ],
)
